package edu.zut.hb.software.together.service.impl;


import java.util.ArrayList;
import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericTreeManagerImpl;
import edu.zut.hb.software.together.dao.FriendGroupDao;
import edu.zut.hb.software.together.domain.FriendGroup;
import edu.zut.hb.software.together.service.FriendGroupService;

@Service
@Transactional
public class FriendGroupServiceImpl extends GenericTreeManagerImpl<FriendGroup, Long>
        implements FriendGroupService {


    FriendGroupDao friendGroupDao;

    @Autowired
    public void FriendGroupDao(FriendGroupDao friendGroupDao) {
        this.friendGroupDao = friendGroupDao;
        this.treeDao=friendGroupDao;
        this.dao=treeDao;
    }

    @Override
        public List list() {
            List list = new ArrayList();
            for (int i = 0; i < 100; i++) {
                FriendGroup friendGroup = new FriendGroup();
                friendGroup.setName("小組名称"+i);
                friendGroup.setFriendNumbers("朋友ID"+i);
                friendGroup.setFriendName("朋友姓名"+i);
                list.add(friendGroup);
            }
            return list;

        }




}
